package br.unip.tcc.domotic.trash;

import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.context.FacesContext;

import org.primefaces.event.FileUploadEvent;

@ManagedBean
public class FileUploadController {

    public void handleFileUpload(FileUploadEvent event) {
    	System.out.println( "Entrou AQUI!!! " + event.getFile().getFileName());
		FacesMessage msg = new FacesMessage("Sucesso", event.getFile().getFileName() + " foi carregada.");
		FacesContext.getCurrentInstance().addMessage(null, msg);
	}
}
                    